package config

type UserSrvConfig struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
	Name string `mapstructure:"name" json:"name"`
}

type JWTInfo struct {
	SigningKey string `mapstructure:"key" json:"key"`
}

type RedisInfo struct {
	Host   string `mapstructure:"host" json:"host"`
	Port   int    `mapstructure:"port" json:"port"`
	Expire int    `mapstructure:"expire" json:"expire"`
}

type AliSmsInfo struct {
	ApiKey     string `mapstructure:"api_key" json:"api_key"`
	ApiSecrect string `mapstructure:"api_secrect" json:"api_secrect"`
}

type ServerConfig struct {
	Name        string        `mapstructure:"name" json:"name"`
	Host        string        `mapstructure:"host" json:"host"`
	Port        int           `mapstructure:"port" json:"port"`
	UserSrvInfo UserSrvConfig `mapstructure:"user_srv" json:"user_srv"`
	JWTInfo     JWTInfo       `mapstructure:"jwt_info" json:"jwt_info"`
	RedisInfo   RedisInfo     `mapstructure:"redis_info" json:"redis_info"`
	AliSmsInfo  AliSmsInfo    `mapstructure:"ali_sms_info" json:"ali_sms_info"`
	ConsulInfo  ConsulInfo    `mapstructure:"consul_info" json:"consul_info"`
	MxshopDebug bool          `mapstructure:"debug" json:"debug"`
	Tags        []string      `mapstructure:"tags" json:"tags"`
}

type ConsulInfo struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type NacosInfo struct {
	Host        string `mapstructure:"host"`
	Port        uint64 `mapstructure:"port"`
	NamespaceId string `mapstructure:"namespace_id"`
	DataId      string `mapstructure:"data_id"`
	Group       string `mapstructure:"group"`
}
